<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>五行哥会员登录页面</title>
<link type="text/css" rel="stylesheet" href="/static/css/style.css" >
<script src="/static/script/jquery-1.7.2.js"></script>
<script>
		$(function(){
			//给添加购物车的按钮绑定单击事件
			$(".addBook2Cart").click(function(){
				//获取要添加的图书的id
				var bookId = $(this).attr("id");
				//设置请求的url
				var url = "/addBook2Cart"
				//设置请求参数
				var param = {"bookId":bookId}
				//发送Ajax请求
				$.post(url,param,function(res){
					if(res == "请先登录！"){
						location = "/pages/user/login.html"
					}else{
						//将响应信息设置到span中
						$("#bookMsg").text(res)
					}
				});
			});
			//切换span标签中的信息
			if("{{.}}"=="用户名或密码不正确！"){
				//设置span标签中的文本值
				$("#msg").text("用户名或密码不正确！");
			}
		});
</script>
</head>
<body>
		<div id="login_header">
			<img class="logo_img" alt="" src="/static/img/logo.gif" >
		</div>
		
			<div class="login_banner">
			
				<div id="l_content">
					<span class="login_word">欢迎登录</span>
				</div>
				
				<div id="content">
					<div class="login_form">
						<div class="login_box">
							<div class="tit">
								<h1>五行哥会员</h1>
								<a href="/pages/user/regist.html">立即注册</a>
							</div>
							<div class="msg_cont">
								<b></b>
								<span class="errorMsg" id="msg">请输入用户名和密码</span>
							</div>
							<div class="form">
								<form action="/login" method="POST">
									<label>用户名称：</label>
									<input class="itxt" type="text" placeholder="请输入用户名" autocomplete="off" tabindex="1" name="username" id="username"/>
									<br />
									<br />
									<label>用户密码：</label>
									<input class="itxt" type="password" placeholder="请输入密码" autocomplete="off" tabindex="1" name="password" id="password"/>
									<br />
									<br />
									<br />
									<input type="submit" value="登录" id="sub_btn" />
								</form>
							</div>
							
						</div>
					</div>
				</div>
			</div>
		<div id="bottom">
			<span>
				五行哥书城.Copyright &copy;2015
			</span>
		</div>
</body>
</html>